/* 音乐搜索页面样式 */
.music-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.music-header {
    text-align: center;
    margin-bottom: 30px;
}

.music-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-header h1 i {
    margin-right: 10px;
    color: #4a90e2;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #4a90e2;
}

.search-button {
    padding: 12px 25px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background: #3572b0;
}

.search-button i {
    margin-right: 5px;
}

/* 播放器样式 */
.player-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none; /* 默认隐藏，有音乐播放时显示 */
}

.player-container.active {
    display: flex;
    flex-wrap: wrap;
}

.player-left {
    flex: 0 0 30%;
    padding-right: 20px;
}

.player-right {
    flex: 0 0 70%;
    display: flex;
    flex-direction: column;
}

.music-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-info {
    margin-bottom: 15px;
}

.music-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #333;
    display: -webkit-box;
    /* -webkit-line-clamp: 1; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-artist {
    font-size: 1rem;
    color: #777;
    margin-bottom: 15px;
}

.lyrics-container {
    flex: 1;
    overflow-y: auto;
    max-height: 150px;
    margin-bottom: 20px;
    padding-right: 10px;
}

.lyrics-line {
    margin-bottom: 8px;
    transition: color 0.3s;
    color: #666;
}

.lyrics-line.active {
    color: #4a90e2;
    font-weight: bold;
}

.controls-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.controls-left {
    display: flex;
    align-items: center;
}

.play-button, .next-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    color: #4a90e2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.play-button:hover, .next-button:hover {
    background-color: rgba(74, 144, 226, 0.1);
}

.audio-progress-container {
    flex: 1;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin: 0 15px;
    cursor: pointer;
    position: relative;
}

.audio-progress {
    height: 100%;
    background: #4a90e2;
    border-radius: 3px;
    width: 0;
}

.audio-time {
    font-size: 0.8rem;
    color: #777;
    min-width: 45px;
}

.volume-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.volume-icon {
    color: #4a90e2;
    margin-right: 10px;
    cursor: pointer;
}

.volume-slider {
    width: 80px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.volume-progress {
    height: 100%;
    background: #4a90e2;
    border-radius: 3px;
    width: 100%;
}

/* 搜索结果列表 */
.search-results {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.music-list {
    width: 100%;
    border-collapse: collapse;
}

.music-list th {
    text-align: left;
    padding: 10px 12px;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

.music-list tbody tr {
    transition: background-color 0.2s;
}

.music-list tbody tr:hover {
    background-color: #f7f9fc;
}

.music-list td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.song-index {
    color: #999;
    width: 40px;
}

.song-title {
    color: #333;
    font-weight: 500;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    color: #666;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-actions {
    width: 100px;
    text-align: right;
}

.play-song, .download-song {
    background: none;
    border: none;
    cursor: pointer;
    color: #4a90e2;
    margin-left: 15px;
    font-size: 1rem;
    transition: color 0.2s;
}

.play-song:hover, .download-song:hover {
    color: #3572b0;
}

/* 加载中动画 */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.loading i {
    color: #4a90e2;
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    margin: 0 5px;
    padding: 8px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: #e0e0e0;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .current-page {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-container.active {
        flex-direction: column;
    }
    
    .player-left, .player-right {
        flex: 0 0 100%;
        padding-right: 0;
    }
    
    .player-left {
        margin-bottom: 20px;
    }
    
    .music-cover {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .controls-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls-left {
        width: 100%;
    }
    
    .volume-container {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .music-list th:nth-child(3), 
    .music-list td:nth-child(3) {
        display: none; /* 隐藏专辑列 */
    }
} 